package com.hx.dao.Impl;

import com.hx.dao.FoodTypeDao;
import com.hx.pojo.FoodType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.context.annotation.Bean;

import javax.sql.DataSource;
import java.sql.SQLException;


@Repository("foodTypeDao")
public class FoodTypeDaoImpl implements FoodTypeDao {

    private DataSource dataSource;

    public void setDataSource(DataSource dataSource){
        this.dataSource = dataSource;
    }



    @Override
    public int save() throws SQLException {
        System.out.println(dataSource);
        System.out.println("FoodTypeDaoImpl save");

        return 1;
    }
}
